package com.atguigu.gulimall.order.feign;

import com.atguigu.gulimall.order.vo.OrderConfirmVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("gulimall-cart")
public interface CartFeignService {

    /**
     * 根据客户号获取 购物车信息
     *
     * @param memberId 客户号
     * @return 购物车信息(最新价格)
     */
    @RequestMapping("/{memberId}/cartItems")
    public List<OrderConfirmVo.OrderItemVo> cartItemsByMemberId(@PathVariable("memberId") Long memberId);
}
